package com.hxkj.client.service;

import com.hxkj.domain.po.AuthFunction;


import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;


/**
 * @author Mrmas
 * @create 2018-05-21 11:58
 * @desc 功能对外接口
 **/

@FeignClient(name = "cms-management")
public interface FunctionServiceClient {
    /**
     * 获取功能列表
     *
     * @return
     * @param parameterDataStruct
     * @throws Exception
     */
    @RequestMapping(value = "/function/getlist", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultPageStruct getAuthFunctions(@RequestBody ParameterDataStruct<AuthFunction> parameterDataStruct) throws Exception;


    /**
     * 新增功能列表
     *
     * @param authFunction
     * @throws Exception
     */
    @RequestMapping(value = "/function/save", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct saveAuthFunction(@RequestBody AuthFunction authFunction) throws Exception;


    /**
     * 更新功能列表
     *
     * @param authFunction
     * @throws Exception
     */
    @RequestMapping(value = "/function/modify", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct updateAuthFunction(@RequestBody AuthFunction authFunction) throws Exception;


    /**
     * 更新功能列表
     *
     * @param authFunction
     * @throws Exception
     */
    @RequestMapping(value = "/function/get", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct queryAuthFunction(@RequestBody AuthFunction authFunction) throws Exception;


    /**
     * 删除功能菜单
     *
     * @param authFunction
     * @throws Exception
     */
    @RequestMapping(value = "/function/remove", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct deleteAuthFunction(@RequestBody AuthFunction authFunction) throws Exception;


    /**
     * 增加功能排序功能
     *
     * @param map
     * @throws Exception
     */
    @RequestMapping(value = "/function/modifyOrderId", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct modifyOrderId(@RequestBody Map<String,Object> map) throws Exception;

}
